\(\int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx\) [1149]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (warning: unable to verify)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F(-2)]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 32, antiderivative size = 415 \[ \int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx=-\frac {\sqrt [4]{-1} a^{5/2} \left (5 c^4+100 i c^3 d+690 c^2 d^2-900 i c d^3-363 d^4\right ) \text {arctanh}\left (\frac {(-1)^{3/4} \sqrt {d} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c+d \tan (e+f x)}}\right )}{64 d^{3/2} f}-\frac {4 i \sqrt {2} a^{5/2} (c-i d)^{5/2} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{f}+\frac {a^2 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{64 d f}+\frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f} \]

[Out]

-1/64*(-1)^(1/4)*a^(5/2)*(5*c^4+100*I*c^3*d+690*c^2*d^2-900*I*c*d^3-363*d^4)*arctanh((-1)^(3/4)*d^(1/2)*(a+I*a
*tan(f*x+e))^(1/2)/a^(1/2)/(c+d*tan(f*x+e))^(1/2))/d^(3/2)/f-4*I*a^(5/2)*(c-I*d)^(5/2)*arctanh(2^(1/2)*a^(1/2)
*(c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2)/(a+I*a*tan(f*x+e))^(1/2))*2^(1/2)/f+1/64*a^2*(5*c^3+95*I*c^2*d+273*c*d^2
-149*I*d^3)*(a+I*a*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(1/2)/d/f+1/96*a^2*(5*c^2+90*I*c*d+107*d^2)*(a+I*a*tan(f
*x+e))^(1/2)*(c+d*tan(f*x+e))^(3/2)/d/f+1/24*a^2*(c+17*I*d)*(a+I*a*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(5/2)/d/
f-1/4*a^2*(a+I*a*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(7/2)/d/f

Rubi [A] (verified)

Time = 2.02 (sec) , antiderivative size = 415, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.281, Rules used = {3637, 3678, 3682, 3625, 214, 3680, 65, 223, 212} \[ \int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx=-\frac {\sqrt [4]{-1} a^{5/2} \left (5 c^4+100 i c^3 d+690 c^2 d^2-900 i c d^3-363 d^4\right ) \text {arctanh}\left (\frac {(-1)^{3/4} \sqrt {d} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c+d \tan (e+f x)}}\right )}{64 d^{3/2} f}-\frac {4 i \sqrt {2} a^{5/2} (c-i d)^{5/2} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{f}+\frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{64 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f} \]

[In]

Int[(a + I*a*Tan[e + f*x])^(5/2)*(c + d*Tan[e + f*x])^(5/2),x]

[Out]

-1/64*((-1)^(1/4)*a^(5/2)*(5*c^4 + (100*I)*c^3*d + 690*c^2*d^2 - (900*I)*c*d^3 - 363*d^4)*ArcTanh[((-1)^(3/4)*
Sqrt[d]*Sqrt[a + I*a*Tan[e + f*x]])/(Sqrt[a]*Sqrt[c + d*Tan[e + f*x]])])/(d^(3/2)*f) - ((4*I)*Sqrt[2]*a^(5/2)*
(c - I*d)^(5/2)*ArcTanh[(Sqrt[2]*Sqrt[a]*Sqrt[c + d*Tan[e + f*x]])/(Sqrt[c - I*d]*Sqrt[a + I*a*Tan[e + f*x]])]
)/f + (a^2*(5*c^3 + (95*I)*c^2*d + 273*c*d^2 - (149*I)*d^3)*Sqrt[a + I*a*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]
])/(64*d*f) + (a^2*(5*c^2 + (90*I)*c*d + 107*d^2)*Sqrt[a + I*a*Tan[e + f*x]]*(c + d*Tan[e + f*x])^(3/2))/(96*d
*f) + (a^2*(c + (17*I)*d)*Sqrt[a + I*a*Tan[e + f*x]]*(c + d*Tan[e + f*x])^(5/2))/(24*d*f) - (a^2*Sqrt[a + I*a*
Tan[e + f*x]]*(c + d*Tan[e + f*x])^(7/2))/(4*d*f)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 3625

Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
-2*a*(b/f), Subst[Int[1/(a*c - b*d - 2*a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rule 3637

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Dist[a/(d*(m + n - 1
)), Int[(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^n*Simp[b*c*(m - 2) + a*d*(m + 2*n) + (a*c*(m - 2) +
b*d*(3*m + 2*n - 4))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a
^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && GtQ[m, 1] && NeQ[m + n - 1, 0] && (IntegerQ[m] || Intege
rsQ[2*m, 2*n])

Rule 3678

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[B*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^n/(f*(m + n))), x] +
Dist[1/(a*(m + n)), Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n - 1)*Simp[a*A*c*(m + n) - B*(b*c*m + a*
d*n) + (a*A*d*(m + n) - B*(b*d*m - a*c*n))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] &
& NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[n, 0]

Rule 3680

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b*(B/f), Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x
]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && EqQ[A*b + a*B,
 0]

Rule 3682

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(A*b + a*B)/b, Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n, x]
, x] - Dist[B/b, Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(a - b*Tan[e + f*x]), x], x] /; FreeQ[{a, b
, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\frac {a \int \sqrt {a+i a \tan (e+f x)} \left (\frac {1}{2} a (i c+15 d)+\frac {1}{2} a (c+17 i d) \tan (e+f x)\right ) (c+d \tan (e+f x))^{5/2} \, dx}{4 d} \\ & = \frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\frac {\int \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2} \left (\frac {1}{4} a^2 \left (5 i c^2+102 c d-85 i d^2\right )+\frac {1}{4} a^2 \left (5 c^2+90 i c d+107 d^2\right ) \tan (e+f x)\right ) \, dx}{12 d} \\ & = \frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\frac {\int \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (\frac {3}{8} a^3 \left (5 i c^3+161 c^2 d-239 i c d^2-107 d^3\right )+\frac {3}{8} a^3 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \tan (e+f x)\right ) \, dx}{24 a d} \\ & = \frac {a^2 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{64 d f}+\frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\frac {\int \frac {\sqrt {a+i a \tan (e+f x)} \left (\frac {3}{16} a^4 \left (5 i c^4+412 c^3 d-846 i c^2 d^2-636 c d^3+149 i d^4\right )+\frac {3}{16} a^4 \left (5 c^4+100 i c^3 d+690 c^2 d^2-900 i c d^3-363 d^4\right ) \tan (e+f x)\right )}{\sqrt {c+d \tan (e+f x)}} \, dx}{24 a^2 d} \\ & = \frac {a^2 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{64 d f}+\frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\left (4 a^2 (c-i d)^3\right ) \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx+\frac {\left (a \left (5 i c^4-100 c^3 d+690 i c^2 d^2+900 c d^3-363 i d^4\right )\right ) \int \frac {(a-i a \tan (e+f x)) \sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx}{128 d} \\ & = \frac {a^2 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{64 d f}+\frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\frac {\left (8 a^4 (i c+d)^3\right ) \text {Subst}\left (\int \frac {1}{a c-i a d-2 a^2 x^2} \, dx,x,\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {a+i a \tan (e+f x)}}\right )}{f}+\frac {\left (a^3 \left (5 i c^4-100 c^3 d+690 i c^2 d^2+900 c d^3-363 i d^4\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x} \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{128 d f} \\ & = -\frac {4 i \sqrt {2} a^{5/2} (c-i d)^{5/2} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{f}+\frac {a^2 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{64 d f}+\frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\frac {\left (a^2 \left (5 c^4+100 i c^3 d+690 c^2 d^2-900 i c d^3-363 d^4\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {c+i d-\frac {i d x^2}{a}}} \, dx,x,\sqrt {a+i a \tan (e+f x)}\right )}{64 d f} \\ & = -\frac {4 i \sqrt {2} a^{5/2} (c-i d)^{5/2} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{f}+\frac {a^2 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{64 d f}+\frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f}+\frac {\left (a^2 \left (5 c^4+100 i c^3 d+690 c^2 d^2-900 i c d^3-363 d^4\right )\right ) \text {Subst}\left (\int \frac {1}{1+\frac {i d x^2}{a}} \, dx,x,\frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}}\right )}{64 d f} \\ & = -\frac {\sqrt [4]{-1} a^{5/2} \left (5 c^4+100 i c^3 d+690 c^2 d^2-900 i c d^3-363 d^4\right ) \text {arctanh}\left (\frac {(-1)^{3/4} \sqrt {d} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c+d \tan (e+f x)}}\right )}{64 d^{3/2} f}-\frac {4 i \sqrt {2} a^{5/2} (c-i d)^{5/2} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{f}+\frac {a^2 \left (5 c^3+95 i c^2 d+273 c d^2-149 i d^3\right ) \sqrt {a+i a \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{64 d f}+\frac {a^2 \left (5 c^2+90 i c d+107 d^2\right ) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{96 d f}+\frac {a^2 (c+17 i d) \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{5/2}}{24 d f}-\frac {a^2 \sqrt {a+i a \tan (e+f x)} (c+d \tan (e+f x))^{7/2}}{4 d f} \\ \end{align*}

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(849\) vs. \(2(415)=830\).

Time = 15.66 (sec) , antiderivative size = 849, normalized size of antiderivative = 2.05 \[ \int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx=-\frac {\left (\frac {1}{128}+\frac {i}{128}\right ) \cos ^3(e+f x) \left (\left (5 c^4+100 i c^3 d+690 c^2 d^2-900 i c d^3-363 d^4\right ) \left (\log \left (\frac {(2+2 i) e^{\frac {i e}{2}} \left (c+i d-i c e^{i (e+f x)}-d e^{i (e+f x)}+(1+i) \sqrt {d} \sqrt {1+e^{2 i (e+f x)}} \sqrt {c-\frac {i d \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}}\right )}{\sqrt {d} \left (-5 c^4-100 i c^3 d-690 c^2 d^2+900 i c d^3+363 d^4\right ) \left (i+e^{i (e+f x)}\right )}\right )-\log \left (-\frac {(2+2 i) e^{\frac {i e}{2}} \left (c+i d+i c e^{i (e+f x)}+d e^{i (e+f x)}+(1+i) \sqrt {d} \sqrt {1+e^{2 i (e+f x)}} \sqrt {c-\frac {i d \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}}\right )}{\sqrt {d} \left (-5 c^4-100 i c^3 d-690 c^2 d^2+900 i c d^3+363 d^4\right ) \left (-i+e^{i (e+f x)}\right )}\right )\right )+(512+512 i) (c-i d)^{5/2} d^{3/2} \log \left (2 \left (\sqrt {c-i d} \cos (e+f x)+i \sqrt {c-i d} \sin (e+f x)+\sqrt {1+\cos (2 e+2 f x)+i \sin (2 e+2 f x)} \sqrt {c+d \tan (e+f x)}\right )\right )\right ) (\cos (2 e)-i \sin (2 e)) (a+i a \tan (e+f x))^{5/2}}{d^{3/2} f (\cos (f x)+i \sin (f x))^2 \sqrt {1+\cos (2 (e+f x))+i \sin (2 (e+f x))}}+\frac {\cos ^2(e+f x) \sqrt {\sec (e+f x) (c \cos (e+f x)+d \sin (e+f x))} \left (\left (-15 c^3+719 i c^2 d+1621 c d^2-845 i d^3\right ) \left (\frac {\cos (2 e)}{192 d}-\frac {i \sin (2 e)}{192 d}\right )+(17 i c+23 d) \sec ^2(e+f x) \left (\frac {1}{24} i d \cos (2 e)+\frac {1}{24} d \sin (2 e)\right )+\left (59 c^2-226 i c d-131 d^2\right ) \sec (e+f x) \left (-\frac {1}{96} i \cos (3 e+f x)-\frac {1}{96} \sin (3 e+f x)\right )+\sec ^3(e+f x) \left (-\frac {1}{4} i d^2 \cos (3 e+f x)-\frac {1}{4} d^2 \sin (3 e+f x)\right )\right ) (a+i a \tan (e+f x))^{5/2}}{f (\cos (f x)+i \sin (f x))^2} \]

[In]

Integrate[(a + I*a*Tan[e + f*x])^(5/2)*(c + d*Tan[e + f*x])^(5/2),x]

[Out]

((-1/128 - I/128)*Cos[e + f*x]^3*((5*c^4 + (100*I)*c^3*d + 690*c^2*d^2 - (900*I)*c*d^3 - 363*d^4)*(Log[((2 + 2
*I)*E^((I/2)*e)*(c + I*d - I*c*E^(I*(e + f*x)) - d*E^(I*(e + f*x)) + (1 + I)*Sqrt[d]*Sqrt[1 + E^((2*I)*(e + f*
x))]*Sqrt[c - (I*d*(-1 + E^((2*I)*(e + f*x))))/(1 + E^((2*I)*(e + f*x)))]))/(Sqrt[d]*(-5*c^4 - (100*I)*c^3*d -
 690*c^2*d^2 + (900*I)*c*d^3 + 363*d^4)*(I + E^(I*(e + f*x))))] - Log[((-2 - 2*I)*E^((I/2)*e)*(c + I*d + I*c*E
^(I*(e + f*x)) + d*E^(I*(e + f*x)) + (1 + I)*Sqrt[d]*Sqrt[1 + E^((2*I)*(e + f*x))]*Sqrt[c - (I*d*(-1 + E^((2*I
)*(e + f*x))))/(1 + E^((2*I)*(e + f*x)))]))/(Sqrt[d]*(-5*c^4 - (100*I)*c^3*d - 690*c^2*d^2 + (900*I)*c*d^3 + 3
63*d^4)*(-I + E^(I*(e + f*x))))]) + (512 + 512*I)*(c - I*d)^(5/2)*d^(3/2)*Log[2*(Sqrt[c - I*d]*Cos[e + f*x] +
I*Sqrt[c - I*d]*Sin[e + f*x] + Sqrt[1 + Cos[2*e + 2*f*x] + I*Sin[2*e + 2*f*x]]*Sqrt[c + d*Tan[e + f*x]])])*(Co
s[2*e] - I*Sin[2*e])*(a + I*a*Tan[e + f*x])^(5/2))/(d^(3/2)*f*(Cos[f*x] + I*Sin[f*x])^2*Sqrt[1 + Cos[2*(e + f*
x)] + I*Sin[2*(e + f*x)]]) + (Cos[e + f*x]^2*Sqrt[Sec[e + f*x]*(c*Cos[e + f*x] + d*Sin[e + f*x])]*((-15*c^3 +
(719*I)*c^2*d + 1621*c*d^2 - (845*I)*d^3)*(Cos[2*e]/(192*d) - ((I/192)*Sin[2*e])/d) + ((17*I)*c + 23*d)*Sec[e
+ f*x]^2*((I/24)*d*Cos[2*e] + (d*Sin[2*e])/24) + (59*c^2 - (226*I)*c*d - 131*d^2)*Sec[e + f*x]*((-1/96*I)*Cos[
3*e + f*x] - Sin[3*e + f*x]/96) + Sec[e + f*x]^3*((-1/4*I)*d^2*Cos[3*e + f*x] - (d^2*Sin[3*e + f*x])/4))*(a +
I*a*Tan[e + f*x])^(5/2))/(f*(Cos[f*x] + I*Sin[f*x])^2)

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1850 vs. \(2 (342 ) = 684\).

Time = 0.92 (sec) , antiderivative size = 1851, normalized size of antiderivative = 4.46

method result size
derivativedivides \(\text {Expression too large to display}\) \(1851\)
default \(\text {Expression too large to display}\) \(1851\)

[In]

int((a+I*a*tan(f*x+e))^(5/2)*(c+d*tan(f*x+e))^(5/2),x,method=_RETURNVERBOSE)

[Out]

1/768/f*(a*(1+I*tan(f*x+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
tan(f*x+e)+I*a*c+2*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)*(I*a*d)^(1/2)+a*d)/(I*a*d)^(1/2))*2^(1/2)*(-a*(
I*d-c))^(1/2)*a*c^2*d^2-768*I*ln(1/2*(2*I*a*d*tan(f*x+e)+I*a*c+2*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)*(
I*a*d)^(1/2)+a*d)/(I*a*d)^(1/2))*2^(1/2)*(-a*(I*d-c))^(1/2)*a*c*d+768*ln(1/2*(2*I*a*d*tan(f*x+e)+I*a*c+2*(a*(1
+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)*(I*a*d)^(1/2)+a*d)/(I*a*d)^(1/2))*2^(1/2)*(-a*(I*d-c))^(1/2)*a*c*d-768*
ln(1/2*(2*I*a*d*tan(f*x+e)+I*a*c+2*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)*(I*a*d)^(1/2)+a*d)/(I*a*d)^(1/2
))*2^(1/2)*(-a*(I*d-c))^(1/2)*a*d^2-768*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c
))^(1/2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2))/(tan(f*x+e)+I))*(I*a*d)^(1/2)*a*c*d+768*ln((3*a*c+I*a*ta
n(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2))/(t
an(f*x+e)+I))*(I*a*d)^(1/2)*a*d^2)*2^(1/2)/d/(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)/(I*a*d)^(1/2)/(-a*(I*
d-c))^(1/2)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1919 vs. \(2 (327) = 654\).

Time = 0.34 (sec) , antiderivative size = 1919, normalized size of antiderivative = 4.62 \[ \int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx=\text {Too large to display} \]

[In]

integrate((a+I*a*tan(f*x+e))^(5/2)*(c+d*tan(f*x+e))^(5/2),x, algorithm="fricas")

[Out]

1/384*(768*sqrt(2)*(d*f*e^(6*I*f*x + 6*I*e) + 3*d*f*e^(4*I*f*x + 4*I*e) + 3*d*f*e^(2*I*f*x + 2*I*e) + d*f)*sqr
t(-(a^5*c^5 - 5*I*a^5*c^4*d - 10*a^5*c^3*d^2 + 10*I*a^5*c^2*d^3 + 5*a^5*c*d^4 - I*a^5*d^5)/f^2)*log((I*sqrt(2)
*f*sqrt(-(a^5*c^5 - 5*I*a^5*c^4*d - 10*a^5*c^3*d^2 + 10*I*a^5*c^2*d^3 + 5*a^5*c*d^4 - I*a^5*d^5)/f^2)*e^(I*f*x
 + I*e) + sqrt(2)*(a^2*c^2 - 2*I*a^2*c*d - a^2*d^2 + (a^2*c^2 - 2*I*a^2*c*d - a^2*d^2)*e^(2*I*f*x + 2*I*e))*sq
rt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1)))*e^(
-I*f*x - I*e)/(a^2*c^2 - 2*I*a^2*c*d - a^2*d^2)) - 768*sqrt(2)*(d*f*e^(6*I*f*x + 6*I*e) + 3*d*f*e^(4*I*f*x + 4
*I*e) + 3*d*f*e^(2*I*f*x + 2*I*e) + d*f)*sqrt(-(a^5*c^5 - 5*I*a^5*c^4*d - 10*a^5*c^3*d^2 + 10*I*a^5*c^2*d^3 +
5*a^5*c*d^4 - I*a^5*d^5)/f^2)*log((-I*sqrt(2)*f*sqrt(-(a^5*c^5 - 5*I*a^5*c^4*d - 10*a^5*c^3*d^2 + 10*I*a^5*c^2
*d^3 + 5*a^5*c*d^4 - I*a^5*d^5)/f^2)*e^(I*f*x + I*e) + sqrt(2)*(a^2*c^2 - 2*I*a^2*c*d - a^2*d^2 + (a^2*c^2 - 2
*I*a^2*c*d - a^2*d^2)*e^(2*I*f*x + 2*I*e))*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e)
 + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-I*f*x - I*e)/(a^2*c^2 - 2*I*a^2*c*d - a^2*d^2)) - 2*sqrt(2)*((15
*a^2*c^3 - 719*I*a^2*c^2*d - 1621*a^2*c*d^2 + 845*I*a^2*d^3)*e^(7*I*f*x + 7*I*e) + (45*a^2*c^3 - 1921*I*a^2*c^
2*d - 3415*a^2*c*d^2 + 1275*I*a^2*d^3)*e^(5*I*f*x + 5*I*e) + (45*a^2*c^3 - 1685*I*a^2*c^2*d - 2511*a^2*c*d^2 +
 1135*I*a^2*d^3)*e^(3*I*f*x + 3*I*e) + 3*(5*a^2*c^3 - 161*I*a^2*c^2*d - 239*a^2*c*d^2 + 107*I*a^2*d^3)*e^(I*f*
x + I*e))*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e
) + 1)) + 3*(d*f*e^(6*I*f*x + 6*I*e) + 3*d*f*e^(4*I*f*x + 4*I*e) + 3*d*f*e^(2*I*f*x + 2*I*e) + d*f)*sqrt((25*I
*a^5*c^8 - 1000*a^5*c^7*d - 3100*I*a^5*c^6*d^2 - 129000*a^5*c^5*d^3 + 652470*I*a^5*c^4*d^4 + 1314600*a^5*c^3*d
^5 - 1310940*I*a^5*c^2*d^6 - 653400*a^5*c*d^7 + 131769*I*a^5*d^8)/(d^3*f^2))*log(-(2*I*d^2*f*sqrt((25*I*a^5*c^
8 - 1000*a^5*c^7*d - 3100*I*a^5*c^6*d^2 - 129000*a^5*c^5*d^3 + 652470*I*a^5*c^4*d^4 + 1314600*a^5*c^3*d^5 - 13
10940*I*a^5*c^2*d^6 - 653400*a^5*c*d^7 + 131769*I*a^5*d^8)/(d^3*f^2))*e^(I*f*x + I*e) - sqrt(2)*(5*a^2*c^4 + 1
00*I*a^2*c^3*d + 690*a^2*c^2*d^2 - 900*I*a^2*c*d^3 - 363*a^2*d^4 + (5*a^2*c^4 + 100*I*a^2*c^3*d + 690*a^2*c^2*
d^2 - 900*I*a^2*c*d^3 - 363*a^2*d^4)*e^(2*I*f*x + 2*I*e))*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2
*I*f*x + 2*I*e) + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-I*f*x - I*e)/(5*a^2*c^4 + 100*I*a^2*c^3*d + 690*a
^2*c^2*d^2 - 900*I*a^2*c*d^3 - 363*a^2*d^4)) - 3*(d*f*e^(6*I*f*x + 6*I*e) + 3*d*f*e^(4*I*f*x + 4*I*e) + 3*d*f*
e^(2*I*f*x + 2*I*e) + d*f)*sqrt((25*I*a^5*c^8 - 1000*a^5*c^7*d - 3100*I*a^5*c^6*d^2 - 129000*a^5*c^5*d^3 + 652
470*I*a^5*c^4*d^4 + 1314600*a^5*c^3*d^5 - 1310940*I*a^5*c^2*d^6 - 653400*a^5*c*d^7 + 131769*I*a^5*d^8)/(d^3*f^
2))*log(-(-2*I*d^2*f*sqrt((25*I*a^5*c^8 - 1000*a^5*c^7*d - 3100*I*a^5*c^6*d^2 - 129000*a^5*c^5*d^3 + 652470*I*
a^5*c^4*d^4 + 1314600*a^5*c^3*d^5 - 1310940*I*a^5*c^2*d^6 - 653400*a^5*c*d^7 + 131769*I*a^5*d^8)/(d^3*f^2))*e^
(I*f*x + I*e) - sqrt(2)*(5*a^2*c^4 + 100*I*a^2*c^3*d + 690*a^2*c^2*d^2 - 900*I*a^2*c*d^3 - 363*a^2*d^4 + (5*a^
2*c^4 + 100*I*a^2*c^3*d + 690*a^2*c^2*d^2 - 900*I*a^2*c*d^3 - 363*a^2*d^4)*e^(2*I*f*x + 2*I*e))*sqrt(((c - I*d
)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-I*f*x - I*e
)/(5*a^2*c^4 + 100*I*a^2*c^3*d + 690*a^2*c^2*d^2 - 900*I*a^2*c*d^3 - 363*a^2*d^4)))/(d*f*e^(6*I*f*x + 6*I*e) +
 3*d*f*e^(4*I*f*x + 4*I*e) + 3*d*f*e^(2*I*f*x + 2*I*e) + d*f)

Sympy [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx=\text {Timed out} \]

[In]

integrate((a+I*a*tan(f*x+e))**(5/2)*(c+d*tan(f*x+e))**(5/2),x)

[Out]

Timed out

Maxima [F(-2)]

Exception generated. \[ \int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((a+I*a*tan(f*x+e))^(5/2)*(c+d*tan(f*x+e))^(5/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(3*d-c>0)', see `assume?` for m
ore details)

Giac [F(-2)]

Exception generated. \[ \int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((a+I*a*tan(f*x+e))^(5/2)*(c+d*tan(f*x+e))^(5/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Unable to divide, perhaps due to rounding error%%%{18,[0,10,0,0,0]%%%}+%%%{-120,[0,9,0,0,1]%%%}+%%%{%%%{%%{
[360,0]:[1,

Mupad [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{5/2} (c+d \tan (e+f x))^{5/2} \, dx=\int {\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{5/2}\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2} \,d x \]

[In]

int((a + a*tan(e + f*x)*1i)^(5/2)*(c + d*tan(e + f*x))^(5/2),x)

[Out]

int((a + a*tan(e + f*x)*1i)^(5/2)*(c + d*tan(e + f*x))^(5/2), x)